<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath%>"/>
		<meta charset="utf-8" />
		<title>菜单管理</title>
		
		<style type="text/css">
			li{
				list-style: none;
			}
			h1{
				text-align:center;
			}
			.yiji{
				overflow:hidden;
			}
			.yj .jia{
				display:inline-block;
				padding:0px;
				cursor:pointer;
			}
			.yiji .nav{
				list-style: none;				
				margin-bottom:5px;
			}
			.yj,.ej{
				width:150px;
				float:left;
			}
			.erji{
				display: none;
				overflow:hidden;
			}
			#asa{
				overflow:hidden;
				
			}
			
		</style>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript">
			$(function(){
				$(".yj").click(function(){
					var index=$(".yj").index($(this));
					$(".erji").eq(index).toggle().siblings().hide();
					$(".nav").show();
				})
				
			})
		</script>
</head>
<body>
<%@ include file="/HT/login_control.jsp" %> 
<div id="asa">
	<h1>菜单管理</h1>
	<ul class="yiji">
		<c:forEach items="${list }" var="yiji">
		<li class="nav"><span class="yj"><span class="jia">+</span>&emsp;${yiji.n_name }</span>&emsp;<a href="/Vancl/updatetype.shtml?id=${yiji.n_id }">编辑</a>&emsp;</li>
		<div class="erji">
				<ul>
				<c:forEach items="${yiji.me }" var="erji">
					<li><span class="ej">${erji.m_name }</span>&emsp;<a href="/Vancl/updatetype2.shtml?id=${erji.m_id }">编辑</a>&emsp;</li>
				</c:forEach>
				</ul>
			</div>
			
		</c:forEach>
	</ul>
	
</div>
</body>
</html>